'''
Created on 2012-3-27下午10:59:21
字符串的操作
@author: yasenagat
@email:   yasenagat@gmail.com

'''


print(''' content-type: text/html
<h1>hello world</h1>
click <a href=""  >haha</a>
''')

#字符串存储在一个0开始，整数索引的字符序列中
str = 'abcdef'

#按照index取某一个字符
print(str[4])

#截取字符串
print(str[2:])

str = str + '哈哈'
print(str)

a = '1'
b = '3'
print(a)
print(a+b)
print(int(a)+int(b))

c = 3.4
print(repr(c))

#format格式化字符串
print(format(c,'0.5f'))
